import requests from "@/utils/request";
import { pa } from "element-plus/es/locale";


export function userpage(params: any) {
    return requests({
        url: '/user/page',
        method: 'get',
        params
    })
}

export function add(params: any) {
    return requests({
        url: '/user/add',
        method: 'post',
        data:params
    })
}

export function update(params: any) {
    return requests({
        url: '/user/update',
        method: 'post',
        data:params
    })
}

export function del(id:any) {
    return requests({
        url: `/user/delete/${id}`,
        method: 'DELETE',
    })
}

export function list(params:any) {
    return requests({
        url: '/material/list',
        method: 'get',
        params
    })
}

export function save(params: any) {
    return requests({
        url: '/material/save',
        method: 'post',
        data:params
    })
}

export function edit(params: any) {
    return requests({
        url: '/material/update',
        method: 'post',
        data:params
    })
}

export function materialDel(id: any) {
    return requests({url:`material/${id}`,method:'delete'})
}

export function productprices(params: any) { return requests({ url: '/product-prices/page', method: 'get', params }) }
export function productpricesList(params:any){return requests({url:'/product-prices/list',method:'get',params})}

export function productpricesAdd(params: any) { return requests({ url: '/product-prices', method: 'post', data: params }) }
export function productpricesDel(id: any) { return requests({ url: '/product-prices/delete/' + id, method: 'DELETE' }) }
export function productpricesEdit(params:any){return requests({url:'/product-prices/update',method:'post',data:params})}

export function dictList(params: any) { return requests({ url: '/dict-data/tree', method: 'get', params }) }
export function diList(params: any) { return requests({ url: '/dict-data/list', method: 'get', params }) }
export function dict(params:any){return requests({url:'/dict-data/list',method:'get',params})}
export function dictAdd(params: any) { return requests({ url: '/dict-data/add', method: 'post', data: params }) }
export function dictEdit(params: any) { return requests({ url: '/dict-data/update', method: 'post', data: params }) }
export function dictDel(id: any) { return requests({ url: '/dict-data/delete/' + id, method: 'DELETE' }) }


export function bronzingList(params:any){return requests({url:'/bronzing/list',method:'get',params})}
export function bronzingAdd(params: any) { return requests({ url: '/bronzing/add', method: 'post', data: params }) }
export function bronzingEdit(params: any) { return requests({ url: '/bronzing/update', method: 'post', data: params }) }
export function bronzingDel(id:any){return requests({url:'/bronzing/delete/'+id,method:'DELETE'})}


export function dictTypeList(params:any){return requests({url:'/dict-type/list',method:'get',params})}
export function dictTypeAdd(params: any) { return requests({ url: '/dict-type/add', method: 'post', data: params }) }
export function dictTypeEdit(params: any) { return requests({ url: '/dict-type/update', method: 'post', data: params }) }
export function dictTypeDel(id:any){return requests({url:'/dict-type/delete/'+id,method:'DELETE'})}

export function factorList(params: any) { return requests({ url: '/factor/list', method: 'get' }) }
export function getFactor(params:any){return requests({url:'/factor/getFactor',method:'get',params})}
export function factorAdd(params: any) { return requests({ url: '/factor/add', method: 'post', data: params }) }
export function factorEdit(params: any) { return requests({ url: '/factor/update', method: 'post', data: params }) }
export function factorDel(id:any){return requests({url:'/factor/delete/'+id,method:'DELETE'})}


